package com.yale.elasticsearch.controller.query;

import com.yale.elasticsearch.dto.BoolQueryDTO;
import com.yale.elasticsearch.service.query.BoolQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author :yale
 * @date : 2024/8/1
 */
@Api(tags = "查询-布尔查询")
@RestController
@RequestMapping("/query")
public class BoolQueryController {

    @Resource
    private BoolQueryService boolQueryService;

    @ApiOperation(value = "布尔查询", notes = "多个条件组合查询")
    @PostMapping("/bool")
    public Object boolQuery(@RequestBody BoolQueryDTO boolQueryDTO) {
        return boolQueryService.boolQuery(boolQueryDTO);
    }

}
